<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const user = {
        firstName: "li",
        lastName: "jack",
      };
      Object.defineProperty(user, "fullName", {
        get() {
          return `${this.lastName} ${this.firstName}`;
        },
        set(value) {
          [this.lastName, this.firstName] = value.split(" ");
        },
        enumerable: true,
        configurable: true,
      }); 
    </script>
  </body>
</html>
